package com.cdn.auth.user;

import java.io.Serializable;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * 蔡定努
 * 2024/06/28 16:58
 */
public class UserDetails implements Serializable {

    private static final long serialVersionUID = 5821554001726580871L;


    private String userName;

    private Integer userId;

    private Set<String> authoritys = new HashSet<>();

    private Set<String> roles = new HashSet<>();

    private Boolean isAdmin = false;


    private Map<String, String> param = new HashMap<>();


    public Set<String> getAuthoritys() {
        return authoritys;
    }

    public UserDetails setAuthoritys(Set<String> authoritys) {
        this.authoritys = authoritys;
        return this;
    }

    public Boolean getAdmin() {
        return isAdmin;
    }

    public UserDetails setAdmin(Boolean admin) {
        isAdmin = admin;
        return this;
    }

    public Set<String> getRoles() {
        return roles;
    }

    public UserDetails setRoles(Set<String> roles) {
        this.roles = roles;
        return this;
    }

    public Integer getUserId() {
        return userId;
    }

    public UserDetails setUserId(Integer userId) {
        this.userId = userId;
        return this;
    }

    public String getUserName() {
        return userName;
    }

    public UserDetails setUserName(String userName) {
        this.userName = userName;
        return this;
    }

    public Map<String, String> getParam() {
        return param;
    }

    public UserDetails setParam(Map<String, String> param) {
        this.param = param;
        return this;
    }
}
